package com.brother.util;

import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

import org.apache.log4j.Logger;

public class MD5 {
public static String getMD(String text){
	String enPa = "";
	try {
		MessageDigest d = MessageDigest.getInstance("MD5");
		d.update(text.getBytes());
		byte[] pa = d.digest();

		for(int i = 0; i < pa.length; i++){
			enPa +=pa[i];
		}
//		System.out.println(enPa);
		
	} catch (Exception e) {
		Logger.getLogger(MD5.class).error(e);
	}
	return enPa;
}
}
